package com.jumi.microservice.stock.service;

import com.jumi.microservice.common.base.dto.ResponseResult;
import com.jumi.microservice.stock.api.dto.CommodityStockReleaseDTO;
import com.jumi.microservice.stock.domain.StockDTO;
import com.jumi.microservice.stock.domain.StockOccupy4CommodityDTO;
import com.jumi.microservice.stock.domain.StockOccupy4WarehouseDTO;
import com.jumi.microservice.stock.dto.StockMaterialStockDTO;

import java.util.List;

/**
 * @ClassName StockService
 * @Description
 * @Author Abel Yang
 * @Date 2020/8/25/025 15:15
 **/
public interface StockService {

    /**
     * @Description: 物料入库库存
     * @Param jmStockDto
     * @Return {@link ResponseResult}
     * @Throws
     * @Author Abel Yang
     * @Date 2020/8/31/031 16:01
     */
    ResponseResult inStock(StockDTO jmStockDto);

    /**
     * @Description: 占用库存(商城申请库存)
     * @Param stockOccupy4CommodityDTO
     * @Return {@link ResponseResult}
     * @Throws
     * @Author Abel Yang
     * @Date 2020/9/24/024 16:31
     */
    ResponseResult occupyStock(StockOccupy4CommodityDTO stockOccupy4CommodityDTO);

    /**
     * @Description: 占用库存(仓库占用库存)
     * @Param stockOccupy4WarehouseDTO
     * @Return {@link ResponseResult}
     * @Throws
     * @Author Abel Yang
     * @Date 2020/9/24/024 16:30
     */
    ResponseResult occupyStock(StockOccupy4WarehouseDTO stockOccupy4WarehouseDTO);

    /**
     * @Description: 占用释放-审核公共出库申请
     * @Param stockOccupy4WarehouseDTO
     * @Return {@link ResponseResult}
     * @Throws
     * @Author Abel Yang
     * @Date 2020/9/24/024 16:44
     */
    ResponseResult occupyStockRelease4PublicApply(StockOccupy4WarehouseDTO stockOccupy4WarehouseDTO);

    /**
     * @Description: 占用释放-审核公共出库申请不通过接口
     * @Param stockOccupy4WarehouseDTO
     * @Return {@link ResponseResult}
     * @Throws
     * @Author Abel Yang
     * @Date 2020/9/24/024 16:44
     */
    ResponseResult occupyStockRelease2Status(StockOccupy4WarehouseDTO stockOccupy4WarehouseDTO, Integer type);

    /**
     * @Description: 占用释放-仓库售后单出库
     * @Param stockOccupy4WarehouseDTO
     * @Return {@link ResponseResult}
     * @Throws
     * @Author Abel Yang
     * @Date 2020/9/25/025 10:02
     */
    ResponseResult occupyStockRelease4AfterSaleOrder(StockOccupy4WarehouseDTO stockOccupy4WarehouseDTO);

    /**
     * @Description: 占用释放-仓库订单出库
     * @Param stockOccupy4WarehouseDTO
     * @Return {@link ResponseResult}
     * @Throws
     * @Author Abel Yang
     * @Date 2020/9/25/025 11:25
     */
    ResponseResult occupyStockRelease4Order(StockOccupy4WarehouseDTO stockOccupy4WarehouseDTO);

    /**
     * @Description: 查询仓库物料id库存
     * @Param materialIds
     * @Param warehouseId
     * @Return {@link List< StockMaterialStockDTO>}
     * @Throws
     * @Author Abel Yang
     * @Date 2020/9/10/010 16:10
     */
    List<StockMaterialStockDTO> getMaterialStock(List<Long> materialIds, Long warehouseId);

    /**
     * @Description: 商城物料库存释放
     * @Param commodityStockReleaseDTOS
     * @Param updateBy
     * @Return {@link int}
     * @Throws
     * @Author Abel Yang
     * @Date 2020/10/19/019 15:53
     */
    int commodityStockRelease(List<CommodityStockReleaseDTO> commodityStockReleaseDTOS, String updateBy);
}
